export const state = () => ({
  historyList: []
});

export const mutations = {
  addHistory(state, data) {
    state.historyList.unshift(data);
    if (state.historyList.length > 5) {
      state.historyList.length = 5;
    }
  }
};